package edu.gdkm.dao;

import edu.gdkm.pojo.Account;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface AccountDao {
    @Select("select * from account where id=#{id}")
    public Account findAccountById(Integer id);
    @Insert("insert into account values(null,#{username},#{balance})")
    public int insertAccount(Account account);
    @Update("update account set username = #{username} ,balance = #{balance} where id =#{id}")
    public int updateAccount(Account account);
}
